<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>QuickMedia</title>
  <link rel="icon" href="_image/ico.png">
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
  <meta name="description" content="Description">
  <meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
  <link rel="stylesheet" href="//unpkg.com/docsify/lib/themes/vue.css">
  <link rel="stylesheet" href="//unpkg.com/gitalk/dist/gitalk.css">
</head>
<body>
  <!--导航栏-->
  <nav>
      <a href="https://blog.hhui.top/" rel = "nofollow" target = "_blank" title = "一灰灰blog">一灰灰Blog</a> 
      <a href="https://spring.hhui.top/" rel="external nofollow" target = "_blank"  rel = "nofollow" title = "SpringBlog">Spring系列教程</a> 
      <a href="https://zweb.hhui.top" rel="external nofollow" target = "_blank"  rel = "nofollow" title = "QuickMedia">QuickMedia演示网站</a>
  </nav>
  <!--导航栏END-->
  <div id="app"></div>
  <script>
    window.$docsify = {
      name: 'QuickMedia',
      repo: 'https://github.com/liuyueyi/quick-media',
      loadSidebar: true,
      subMaxLevel: 3,
      coverpage: true,
      auto2top: true,
      logo: '/_image/logo.png',
      alias: {
        '/.*/_sidebar.md': '/_sidebar.md'
      },
      formatUpdated: '{MM}/{DD} {HH}:{mm}',

      // 完整配置参数
      search: {
        maxAge: 86400000, // 过期时间，单位毫秒，默认一天
        paths: 'auto', // or 'auto'
        placeholder: 'Type to search',

        // 支持本地化
        placeholder: {
          '/': '输入关键字站内搜索'
        },

        noData: 'No Results!',

        // 支持本地化
        noData: {
          '/zh-cn/': '找不到结果',
          '/': 'No Results'
        },

        // 搜索标题的最大程级, 1 - 6
        depth: 2
      }
    }
  </script>
  <script src="//unpkg.com/docsify/lib/docsify.min.js"></script>
  <script src="//unpkg.com/docsify-copy-code"></script>
  <script src="//unpkg.com/prismjs/components/prism-java.js"></script>
  <script src="//unpkg.com/docsify/lib/plugins/zoom-image.js"></script>
  <script src="//unpkg.com/docsify/lib/plugins/search.js"></script>

  <script src="//unpkg.com/docsify/lib/plugins/gitalk.min.js"></script>
  <script src="//unpkg.com/gitalk/dist/gitalk.min.js"></script>
  <script src="_assert/md5.min.js"></script>
  <script src="//unpkg.com/docsify-pagination/dist/docsify-pagination.min.js"></script>

  <script>
    // https://liuyueyi.github.io/quick-media/#/%E5%85%B6%E4%BB%96/%E5%85%B6%E4%BB%96?id=_4-%E6%8D%90%E8%B5%A0
    function url_parse(url) {
        var left = url.indexOf('/#/');
        if(left < 0) {
          return url;
        }

        var right = url.lastIndexOf('?');
        if (right <= 0 || right < left) {
          right = url.length;
        }
        return url.substring(left, right);
    }

    function get_talk_id() {
      gittalk_id = url_parse(location.href);
      console.log('href', location.href, 'id', gittalk_id);
      if(gittalk_id.length > 45) {
        gittalk_id = md5(gittalk_id);
      }
    }

    const gitalk = new Gitalk({
      clientID: '31664aef1261e5d35dd1',
      clientSecret: '910d8622eead2036356acb2b09200367445cc04b',
      repo: 'quick-media',
      owner: 'liuyueyi',
      admin: ['liuyueyi'],
      distractionFreeMode: false,
      id: 'QuickMedia-TechWebSite'
    })
  </script>
</body>
</html>
